<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ include file="../common/Top.jsp" %>
    <div class="user-register-content">
        <div class="user-register-title">用户注册</div>
        <form action="Register" class="user-form" method="post">
            <c:if test="${requestScope.registerInfo != null}">
                <div class="user-form-error">
                    <i class="fa-solid fa-circle-exclamation error-icon" ></i>
                    <p class="error-msg">${requestScope.registerInfo}</p>
                </div>
            </c:if>
            <div class="user-form-item">
                <input type="text" class="user-form-input" name="userid" id="userid" required="required" placeholder="请输入用户名" autocomplete="off">
                <label for="userid" class="user-form-label">
                    <i class="fa-solid fa-user"></i>
                </label>
                <p class="error-item"></p>
            </div>
            <div class="user-form-item">
                <input type="password" class="user-form-input" name="password" id="password" required="required" placeholder="请输入密码" autocomplete="off">
                <label for="password" class="user-form-label">
                    <i class="fa-solid fa-lock"></i>
                </label>
                <p class="error-item"></p>
            </div>
            <div class="user-form-item">
                <input type="password" class="user-form-input" name="repeatPassword" id="repeatPassword" required="required" placeholder="请再次输入密码" autocomplete="off">
                <label for="repeatPassword" class="user-form-label">
                    <i class="fa-solid fa-lock"></i>
                </label>
                <p class="error-item"></p>
            </div>
            <div class="user-form-item">
                <input type="text" class="user-form-input" name="phone" id="phone" placeholder="请输入手机号码" required="required" autocomplete="off">
                <label for="phone" class="user-form-label">
                    <i class="fa fa-mobile" aria-hidden="true"></i>
                </label>
                <p class="error-item"></p>
            </div>
            <div class="user-form-item">
                <input type="text" class="user-form-input" name="email" id="email" placeholder="请输入邮箱" autocomplete="off">
                <label for="email" class="user-form-label">
                    <i class="fa-solid fa-envelope"></i>
                </label>
            </div>
            <div class="user-form-item">
                <input type="text" class="user-form-input" name="address" id="address" placeholder="请输入你的地址" autocomplete="off">
                <label for="address" class="user-form-label">
                    <i class="fa fa-home" aria-hidden="true"></i>
                </label>
            </div>
            <div class="user-form-checkcode">
                <input type="text" class="user-form-check" name="checkcode" id="checkcode" autocomplete="off" placeholder="请输入验证码">
                <label for="checkcode" class="user-form-checklabel">
                    <i class="fa-solid fa-lock"></i>
                </label>
                <img id="captcha" src="/Captcha" onclick="reloadCaptcha()">
            </div>
            <div class="user-form-item">
                <input type="submit" value="注册" class="user-form-submit">
            </div>
            <div class="user-form-link">
                <a href="LoginForm" class="link">返回登录>></a>
            </div>
        </form>
        <script type="text/javascript" src="./js/check-register.js" charset="UTF-8"></script>
    </div>
<%@ include file="../common/Bottom.jsp" %>
